<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3">

<!-- BEGIN HEAD -->

<head>

    <meta charset="utf-8"/>

    <title>编辑课程信息</title>

    <meta content="width=device-width, initial-scale=1.0" name="viewport"/>
    <meta content="" name="description"/>
    <meta th:content="${session.authorities}" id="authority"/>

    <!-- BEGIN GLOBAL MANDATORY STYLES -->

    <link href="/media/css/bootstrap.min.css" rel="stylesheet"
          type="text/css"/>

    <link href="/media/css/bootstrap-responsive.min.css" rel="stylesheet"
          type="text/css"/>

    <link href="/media/css/font-awesome.min.css" rel="stylesheet"
          type="text/css"/>

    <link href="/media/css/style-metro.css" rel="stylesheet" type="text/css"/>

    <link href="/media/css/style.css" rel="stylesheet" type="text/css"/>

    <link href="/media/css/style-responsive.css" rel="stylesheet"
          type="text/css"/>


    <link rel="shortcut icon" href="/media/image/favicon.ico"/>
    <style type="text/css">

        .radio {
            min-height: 0px;
        }

        .radio input[type="radio"] {
            margin-left: -15px;
        }
    </style>
</head>

<body>

<div class="container-fluid" style="margin:10px 10px;">

    <div class="row-fluid ">

        <div class="span12">
            <!--只有用户具有添加课程的权限时，才显示此表单-->
            <div class="span12 form" sec:authorize="hasAuthority('PERMISSION_COURSE_EDIT')">
                <form class="form-horizontal" id="course_edit_form"
                      onsubmit="return false;">
                    <div class="row-fluid">
                        <div class="span3">
                            <div class="control-group">
                                <label class="control-label span4">课程名称</label>
                                <div class="controls span8">
                                    <input type="text"
                                           class="m-wrap span10"
                                           id="course_name"
                                           name="courseName" th:value="${course.courseName}"> <span
                                        class="help-inline"
                                        style="color: red;">*</span>
                                </div>
                            </div>
                        </div>

                        <div class="span3">
                            <div class="control-group">
                                <label class="control-label span4">课程系列</label>
                                <div class="controls span8">
                                    <select class="m-wrap span12" name="courseSeries">
                                        <option value="0">请选择</option>
                                        <option th:value="${series.id}" th:selected="${course.courseSeries} eq ${series.id}" th:text="${series.courseSeriesName}" th:each="series:${series}">编程</option>

                                    </select>
                                    <!-- 											<span class="help-block">Select your gender.</span> -->
                                </div>
                            </div>
                        </div>
                        <div class="span3">
                            <div class="control-group">
                                <label class="control-label span4">扣课时数</label>
                                <div class="controls span8">
                                    <input type="text"
                                           class="m-wrap span12"
                                           name="deductLessonHour" th:value="${course.deductLessonHour}">
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="row-fluid">

                        <div class="span8">
                            <div class="control-group">
                                <label class="control-label span2">适合年龄</label>
                                <div class="controls span2">
                                    <select class="m-wrap span12" name="suitableAgeFromYear">
                                        <option value="">请选择
                                        </option>
                                        <option value="0岁" th:selected="${course.suitableAgeFromYear} eq '0岁'">0岁
                                        </option>
                                        <option value="1岁" th:selected="${course.suitableAgeFromYear} eq '1岁'">1岁
                                        </option>
                                        <option value="2岁" th:selected="${course.suitableAgeFromYear} eq '2岁'">2岁
                                        </option>
                                        <option value="3岁" th:selected="${course.suitableAgeFromYear} eq '3岁'">3岁
                                        </option>
                                        <option value="4岁" th:selected="${course.suitableAgeFromYear} eq '4岁'">4岁
                                        </option>
                                        <option value="5岁" th:selected="${course.suitableAgeFromYear} eq '5岁'">5岁
                                        </option>
                                        <option value="6岁" th:selected="${course.suitableAgeFromYear} eq '6岁'">6岁
                                        </option>
                                    </select>
                                </div>
                                <div class="controls span2">
                                    <select class="m-wrap span12" name="suitableAgeFromMonth">
                                        <option value="">请选择
                                        </option>
                                        <option value="1个月" th:selected="${course.suitableAgeFromMonth} eq '1个月'">1个月
                                        </option>
                                        <option value="2个月" th:selected="${course.suitableAgeFromMonth} eq '2个月'">2个月
                                        </option>
                                        <option value="3个月" th:selected="${course.suitableAgeFromMonth} eq '3个月'">3个月
                                        </option>
                                        <option value="4个月" th:selected="${course.suitableAgeFromMonth} eq '4个月'">4个月
                                        </option>
                                        <option value="5个月" th:selected="${course.suitableAgeFromMonth} eq '5个月'">5个月
                                        </option>
                                        <option value="6个月" th:selected="${course.suitableAgeFromMonth} eq '6个月'">6个月
                                        </option>
                                        <option value="7个月" th:selected="${course.suitableAgeFromMonth} eq '7个月'">7个月
                                        </option>
                                        <option value="8个月" th:selected="${course.suitableAgeFromMonth} eq '8个月'">8个月
                                        </option>
                                        <option value="9个月" th:selected="${course.suitableAgeFromMonth} eq '9个月'">9个月
                                        </option>
                                        <option value="10个月" th:selected="${course.suitableAgeFromMonth} eq '10个月'">10个月
                                        </option>
                                        <option value="11个月" th:selected="${course.suitableAgeFromMonth} eq '11个月'">11个月
                                        </option>
                                        <option value="12个月" th:selected="${course.suitableAgeFromMonth} eq '12个月'">12个月
                                        </option>

                                    </select>
                                </div>
                                <label class="control-label span1">至</label>
                                <div class="controls span2">
                                    <select class="m-wrap span12" name="suitableAgeToYear">
                                        <option value="">请选择
                                        </option>
                                        <option value="0岁" th:selected="${course.suitableAgeToYear} eq '0岁'">0岁
                                        </option>
                                        <option value="1岁" th:selected="${course.suitableAgeToYear} eq '1岁'">1岁
                                        </option>
                                        <option value="2岁" th:selected="${course.suitableAgeToYear} eq '2岁'">2岁
                                        </option>
                                        <option value="3岁" th:selected="${course.suitableAgeToYear} eq '3岁'">3岁
                                        </option>
                                        <option value="4岁" th:selected="${course.suitableAgeToYear} eq '4岁'">4岁
                                        </option>
                                        <option value="5岁" th:selected="${course.suitableAgeToYear} eq '5岁'">5岁
                                        </option>
                                        <option value="6岁" th:selected="${course.suitableAgeToYear} eq '6岁'">6岁
                                        </option>
                                    </select>
                                </div>
                                <div class="controls span2">
                                    <select class="m-wrap span12" name="suitableAgeToMonth">
                                        <option value="">请选择
                                        </option>
                                        <option value="1个月" th:selected="${course.suitableAgeToMonth} eq '1个月'">1个月
                                        </option>
                                        <option value="2个月" th:selected="${course.suitableAgeToMonth} eq '2个月'">2个月
                                        </option>
                                        <option value="3个月" th:selected="${course.suitableAgeToMonth} eq '3个月'">3个月
                                        </option>
                                        <option value="4个月" th:selected="${course.suitableAgeToMonth} eq '4个月'">4个月
                                        </option>
                                        <option value="5个月" th:selected="${course.suitableAgeToMonth} eq '5个月'">5个月
                                        </option>
                                        <option value="6个月" th:selected="${course.suitableAgeToMonth} eq '6个月'">6个月
                                        </option>
                                        <option value="7个月" th:selected="${course.suitableAgeToMonth} eq '7个月'">7个月
                                        </option>
                                        <option value="8个月" th:selected="${course.suitableAgeToMonth} eq '8个月'">8个月
                                        </option>
                                        <option value="9个月" th:selected="${course.suitableAgeToMonth} eq '9个月'">9个月
                                        </option>
                                        <option value="10个月" th:selected="${course.suitableAgeToMonth} eq '10个月'">10个月
                                        </option>
                                        <option value="11个月" th:selected="${course.suitableAgeToMonth} eq '11个月'">11个月
                                        </option>
                                        <option value="12个月" th:selected="${course.suitableAgeToMonth} eq '12个月'">12个月
                                        </option>
                                    </select>
                                </div>
                            </div>
                        </div>
                        <div class="span4">
                            <div class="control-group">
                                <label class="control-label span2">备注</label>
                                <div class="controls span10">
                                    <input type="text"
                                           class="m-wrap span12"
                                           name="courseRemark" th:value="${course.courseRemark}">
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="row-fluid">
                        <div class="span8">
                            <div class="control-group">
                                <label class="control-label span2">容量：</label>
                                <div class="controls span10">
                                    <div class="radio">
                                        <label>
                                            <input type="radio" name="capacity" th:checked="${course.totalCapacity} gt 0">总数
                                        </label>
                                    </div>
                                    <input type="text"
                                           class="m-wrap span2"
                                           name="totalCapacity" th:value="${course.totalCapacity}"><span class="radio">位</span>
                                    <div class="radio">
                                        <label>
                                            <input type="radio" name="capacity" th:checked="${course.memberCount} gt 0 or ${course.experienceCount} gt 0">会员
                                        </label>
                                    </div>
                                    <input type="text"
                                           class="m-wrap span2"
                                           name="memberCount" th:value="${course.memberCount}"><span>位</span>
                                    <div class="radio">
                                        <label>
                                            ，体验
                                        </label>
                                    </div>
                                    <input type="text"
                                           class="m-wrap span2"
                                           name="experienceCount" th:value="${course.experienceCount}"><span>位</span>
                                </div>
                            </div>
                        </div>
                        <div class="span3">
                            <div class="control-group">
                                <label class="control-label span4">排序</label>
                                <div class="controls span8">
                                    <input type="text"
                                           class="m-wrap span6"
                                           name="courseSort" th:value="${course.courseSort}">
                                </div>
                            </div>
                        </div>

                    </div>
                    <input type="reset" style="display:none;" />
                    <!--/row-->
                </form>
            </div>
        </div>
    </div>
</div>

<script src="/media/js/jquery-1.10.1.min.js" type="text/javascript"></script>

<script src="/media/js/jquery-migrate-1.2.1.min.js"
        type="text/javascript"></script>

<script src="/media/js/bootstrap.min.js" type="text/javascript"></script>

</body>

</html>